﻿<%@ Page Title="Search Friends" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="SearchFriends.aspx.cs" Inherits="RLAWEB.SearchFriends" %>

<%@ Import Namespace="RLAWEB.RLAServiceReference" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <style type="text/css">
        #friendList {
            border: 1px solid #ff8c00;
            background-color: #d3d3d3;
            margin-top: 20px;
            width: 500px;
        }

        .info {
            width: 100px;
            padding: 3px;
        }

        #searchButton {
            margin-bottom: 10px;
        }

        #textInput {
            margin-bottom: 12px;
        }
    </style>
    <h2><%: Title %></h2>
    <h3>Her kan du søge efter andre brugere.

        <%--<asp:Label ID="lblTest" runat="server" Text="Label"></asp:Label>--%>
    </h3>

    <asp:TextBox ID="textInput" runat="server"></asp:TextBox>

    <asp:Button ID="searchButton" runat="server" Text="Søg" BorderStyle="Solid" OnClick="searchButton_Click" />

    <asp:Repeater ID="searchList" runat="server">
        <ItemTemplate>
            <table id="friendList">
                <tr>
                    <td class="info">
                        <b>Brugernavn:</b>
                    </td>
                    <td>
                        <a href="<%# String.Format("/User?ID={0}", Eval("UserId")) %>">
                            <asp:Label ID="lblUserName" runat="server" Text='<%# Eval("ProfileName")%>'></asp:Label>
                        </a>
                    </td>
                </tr>
                <tr>
                    <td class="info">
                        <b>Fornavn:</b>
                    </td>
                    <td>
                        <asp:Label ID="lblFirstName" runat="server" Text='<%# Eval("FirstName")%>'></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="info">
                        <b>Efternavn:</b>
                    </td>
                    <td>
                        <asp:Label ID="lblLastName" runat="server" Text='<%# Eval("LastName")%>'></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="info">
                        <asp:Button ID="btnRequestFriendship" runat="server" Text="Ansøg" PostBackUrl='<%# String.Format("/SearchFriends?ID={0}", Eval("UserId")) %>' OnClick="RequestFriendship_Click" />
                    </td>
                    <tr />
            </table>
        </ItemTemplate>
    </asp:Repeater>
</asp:Content>